import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:ball_lion/resources/styles.dart';

import 'package:ball_lion/widgets/base/wqs_text.dart';

class BallAppBar extends StatelessWidget implements PreferredSizeWidget {
  const BallAppBar({super.key, required this.title, this.actions = const []});

  final String title;
  final List<Widget> actions;

  @override
  Widget build(BuildContext context) {
    return Styles.appBar(
      title: QsText(title, fontSize: 17, fontWeight: FontWeight.w500),
      backgroundColor: Colors.transparent,
      foregroundColor: Colors.transparent,
      elevation: 0,
      systemUiOverlayStyle: const SystemUiOverlayStyle(
          statusBarBrightness: Brightness.dark,
          statusBarIconBrightness: Brightness.dark),
      actions: actions,
    );
  }

  @override
  Size get preferredSize => const Size(double.infinity, 44);
}
